const fs = require('fs');

module.exports = () => {
    const raw = fs.readFileSync('raw').toString();
    const result = {};
    raw.split('\r\n').forEach(section => {
        const [key, ...extra] = section.split(': ');
        if (key && extra.length > 0 && key !== 'Content-Length') {
            result[key] = extra.join(': ');
        }
    });
    return result;
}